package com.sts.sink.model;

import com.sts.sink.StsSink;
import com.sts.sink.impl.ExcelSinkImpl;
import com.sts.source.StsSource;
import com.sts.task.StsTask;
import lombok.Getter;
import lombok.Setter;

/**
 * @author lsl
 * @since 2025年06月28日 13:47
 */
@Getter
@Setter
public class ExcelSinkConfig extends BaseSinkConfig {

    private String filePath;
    private String sheetName = "Sheet1";

    public ExcelSinkConfig(String filePath) {
        this.filePath = filePath;
    }

    public ExcelSinkConfig(String filePath, String sheetName) {
        this.filePath = filePath;
        this.sheetName = sheetName;
    }

    @Override
    public StsSink buildImpl(StsSource stsSource, StsTask stsTask) {
        return new ExcelSinkImpl(stsSource, this, stsTask);
    }
}
